Optimal. Leaf size=36 \[ \sqrt{x} \sin (x)-\sqrt{\frac{\pi }{2}} S\left (\sqrt{\frac{2}{\pi }} \sqrt{x}\right ) \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.034927, antiderivative size = 36, normalized size of antiderivative = 1., number of steps used = 3, number of rules used = 3, integrand size = 8, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.375, Rules used = {3296, 3305, 3351} \[ \sqrt{x} \sin (x)-\sqrt{\frac{\pi }{2}} S\left (\sqrt{\frac{2}{\pi }} \sqrt{x}\right ) \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 3296
Rule 3305
Rule 3351
Rubi steps
\begin{align*} \int \sqrt{x} \cos (x) \, dx &=\sqrt{x} \sin (x)-\frac{1}{2} \int \frac{\sin (x)}{\sqrt{x}} \, dx\\ &=\sqrt{x} \sin (x)-\operatorname{Subst}\left (\int \sin \left (x^2\right ) \, dx,x,\sqrt{x}\right )\\ &=-\sqrt{\frac{\pi }{2}} S\left (\sqrt{\frac{2}{\pi }} \sqrt{x}\right )+\sqrt{x} \sin (x)\\ \end{align*}
Mathematica [C] time = 0.0061006, size = 48, normalized size = 1.33 \[ \frac{\sqrt{-i x} \text{Gamma}\left (\frac{3}{2},-i x\right )+\sqrt{i x} \text{Gamma}\left (\frac{3}{2},i x\right )}{2 \sqrt{x}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.028, size = 27, normalized size = 0.8 \begin{align*} -{\frac{\sqrt{2}\sqrt{\pi }}{2}{\it FresnelS} \left ({\frac{\sqrt{2}}{\sqrt{\pi }}\sqrt{x}} \right ) }+\sin \left ( x \right ) \sqrt{x} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [C] time = 1.74941, size = 90, normalized size = 2.5 \begin{align*} -\frac{1}{16} \, \sqrt{\pi }{\left (\left (i + 1\right ) \, \sqrt{2} \operatorname{erf}\left (\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} \sqrt{x}\right ) + \left (i - 1\right ) \, \sqrt{2} \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} \sqrt{x}\right ) - \left (i - 1\right ) \, \sqrt{2} \operatorname{erf}\left (\sqrt{-i} \sqrt{x}\right ) + \left (i + 1\right ) \, \sqrt{2} \operatorname{erf}\left (\left (-1\right )^{\frac{1}{4}} \sqrt{x}\right )\right )} + \sqrt{x} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.62922, size = 105, normalized size = 2.92 \begin{align*} -\frac{1}{2} \, \sqrt{2} \sqrt{\pi } \operatorname{S}\left (\frac{\sqrt{2} \sqrt{x}}{\sqrt{\pi }}\right ) + \sqrt{x} \sin \left (x\right ) \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A] time = 1.19293, size = 61, normalized size = 1.69 \begin{align*} \frac{3 \sqrt{x} \sin{\left (x \right )} \Gamma \left (\frac{3}{4}\right )}{4 \Gamma \left (\frac{7}{4}\right )} - \frac{3 \sqrt{2} \sqrt{\pi } S\left (\frac{\sqrt{2} \sqrt{x}}{\sqrt{\pi }}\right ) \Gamma \left (\frac{3}{4}\right )}{8 \Gamma \left (\frac{7}{4}\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [C] time = 1.13463, size = 72, normalized size = 2. \begin{align*} -\left (\frac{1}{8} i - \frac{1}{8}\right ) \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (\left (\frac{1}{2} i - \frac{1}{2}\right ) \, \sqrt{2} \sqrt{x}\right ) + \left (\frac{1}{8} i + \frac{1}{8}\right ) \, \sqrt{2} \sqrt{\pi } \operatorname{erf}\left (-\left (\frac{1}{2} i + \frac{1}{2}\right ) \, \sqrt{2} \sqrt{x}\right ) - \frac{1}{2} i \, \sqrt{x} e^{\left (i \, x\right )} + \frac{1}{2} i \, \sqrt{x} e^{\left (-i \, x\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]